-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
graalvm-oracle: init at 22 #321026
base: master
Are you sure you want to change the base?
graalvm-oracle: init at 22 #321026
Conversation
pkgs/top-level/all-packages.nix
Outdated
graalvmCEPackages = | ||
recurseIntoAttrs (callPackage ../development/compilers/graalvm/community-edition { }); | ||
graalvm-ce = graalvmCEPackages.graalvm-ce; | ||
graalvm-oracle = callPackage ../development/compilers/graalvm/oracle { }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This used to be called GraalVM EE, now just "Oracle GraalVM". Maybe oracle-graalvm
would be a better name here?
Do you plan on adding the other supported versions by oracle's graalvm? Such as for JDK 17 and 21. |
@rafaelrc7 I don't have any use for them but I'll take a look |
Rebased on latest nixpkgs to resolve conflicts |
Thanks! I am currently working on packaging pkl in #286658 and the native build depends on graalvm 17, so it would be a lot of help. |
pkgs/top-level/all-packages.nix
Outdated
graalvmCEPackages = callPackage ../development/compilers/graalvm/community-edition { }; | ||
graalvmPackages = recurseIntoAttrs (callPackage ../development/compilers/graalvm { }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like that we have 2 different graalvmPackages
.
I think since we are introducing Oracle GraamVM again, it is a good time to move everything to graalvmPackages
and make graalvmCEPackages
an alias to graalvmPackages
, and deprecate and eventually remove graalvmCEPackages
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can do that, but can you be more specific? Do we want graalvmPackages
to temporarily be the CE packages and also graalvmPackages.oracle
+ graalvmPackages.ce
as the long-term, stable names?
Do we also want this nesting for JDK packages or is pkgs.oracle-graalvm
fine as it is in the current version of the PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can do that, but can you be more specific? Do we want graalvmPackages to temporarily be the CE packages and also graalvmPackages.oracle + graalvmPackages.ce as the long-term, stable names?
Yes. But probably the names will be graalvmPackages.graalvm-oracle
and graalvmPackages.graalvm-ce
, because there are other packages inside graalvmCEPackages
too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've updated the PR, please let me know what you think
"hashes" = { | ||
"aarch64-linux" = { | ||
sha256 = "1s3ma7x22wqg10cqhdgwj0g9qk3n7bqy10dq6x1vgpljdd41v6dx"; | ||
url = "https://download.oracle.com/graalvm/17/latest/graalvm-jdk-17_linux-aarch64_bin.tar.gz"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if this URL is deterministic, there is no /archive/
version for these
url = "https://download.oracle.com/graalvm/22/archive/graalvm-jdk-22_linux-aarch64_bin.tar.gz"; | ||
}; | ||
"x86_64-linux" = { | ||
sha256 = "d1860b5b7588310e70b259c891156f6d0cbc34d0d1feec3b37169ed2a415f3c3"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these hashes are correct, I calculated them with nix-prefetch-url but I need to double check.
Thanks for the feedback @chayleaf , updated |
pkgs/top-level/aliases.nix
Outdated
graalvmCEPackages = graalvmPackages; | ||
graalvm-ce = graalvmPackages.graalvm-ce; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
graalvmCEPackages = graalvmPackages; | |
graalvm-ce = graalvmPackages.graalvm-ce; | |
graalvmCEPackages = graalvmPackages; # 2024-08-10 |
aliases.nix is for deprecated aliases, so you have to put the date in there as a rough estimate of whether it's okay to replace the alias with a throw
(see maintainers/scripts/remove-old-aliases.py)
graalvm-ce is probably fine to not deprecate? in that case, just put it back to all-packages.nix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
graalvm-ce
now lives in graalvmPackages.graalvm-ce
so I'm deprecating this old name #321026 (comment)
"22" = { | ||
"aarch64-linux" = { | ||
sha256 = "sha256-0wPTDBB2T+qrB27+eQGd88mBsEh/ysPfelMT929hBA4="; | ||
url = "https://download.oracle.com/graalvm/22/archive/graalvm-jdk-22_linux-aarch64_bin.tar.gz"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those URLe are unacceptable, especially in this case since Hydra will not cache the result (because this is unfree).
We need either to have a stable URL from upstream or have the files archived somewhere (e.g.: archive.org).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there are some precedents, but they typically result in the packages being marked as broken (see fmod)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found more stable links (with full version strings) here.
I'm not sure if this is sufficient from what you're saying. This package will always be unfree, regardless where we download it from? And I'm not sure it's legal to replicate it to archive.org.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the ones with full version strings should be sufficient (there are some for 17 as well)
Updated download links to those for a specific patch version of each package. |
pkgs/top-level/all-packages.nix
Outdated
@@ -15879,8 +15879,7 @@ with pkgs; | |||
openjdk = jdk; | |||
openjdk_headless = jdk_headless; | |||
|
|||
graalvmCEPackages = callPackage ../development/compilers/graalvm/community-edition { }; | |||
graalvm-ce = graalvmCEPackages.graalvm-ce; | |||
graalvmPackages = recurseIntoAttrs (callPackage ../development/compilers/graalvm { }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like the usage of recurseIntoAttrs
here, we probably need to introduce a scope inside graalvmPackages
to ensure that all packages are build with the same scope.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not familiar with scopes and not sure what this means. I tried just removing recurseIntoAttrs
and things seem to work all the same, so it seems it can be safely dropped?
Is the fact that pkgs/development/compilers/graalvm/graalvm-oracle/default.nix
uses graalvmPackages.buildGraalvm
(from the parent "scope"?) problematic?
Anything I should do to push this forward? |
@ofborg build babashka clojure-lsp |
Build broke for |
I've had a friend build clojure-lsp and babashka off this branch on aarch64-darwin, and it worked. Not sure what's going wrong when ofborg does it?
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please squash your commits accordingly to CONTRIBUTING.md guidelines.
04d1761
to
cec132e
Compare
@thiagokokada Squashed and updated the commit author to myself |
Resolved conflicts again |
Friendly ping :) |
Supersedes #259639, resolves #259631
Description of changes
This adds oracle-graalvm and make buildGraalvm more generic to be used on other places than community-edition.
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Pinging @thiagokokada (reviewer from the previous PR)
Add a 👍 reaction to pull requests you find important.